﻿<!-- #include file="../Include/Admin_Onlogin.asp" -->
<%
Dim XMLStr,FieldXML,Node,NodeXML,ItemID,tya,FieldXMLb,NodeXMLb,XML2,TN,NewNode,FieldXMLall,NodeXMLall
Dim I, SqlStr, RSObj
Set FieldXML = Server.CreateObject("Microsoft.XMLDOM")
FieldXML.async = false
FieldXML.setProperty "ServerHTTPRequest", true 
FieldXML.load(Server.MapPath("../Include/FilMk/"& Login_Username &"_Mk_a.xml"))
Set NodeXML=FieldXML.DocumentElement.SelectNodes("item")

Set FieldXMLb = Server.CreateObject("Microsoft.XMLDOM")
FieldXMLb.async = false
FieldXMLb.setProperty "ServerHTTPRequest", true 
FieldXMLb.load(Server.MapPath("../Include/FilMk/"& Login_Username &"_Mk_b.xml"))
Set NodeXMLb=FieldXMLb.DocumentElement.SelectNodes("item")

Set FieldXMLall = Server.CreateObject("Microsoft.XMLDOM")
FieldXMLall.async = false
FieldXMLall.setProperty "ServerHTTPRequest", true 
FieldXMLall.load(Server.MapPath("../Include/FilMk/MkAll_User.xml"))
Set NodeXMLall=FieldXMLall.DocumentElement.SelectNodes("item")

Select Case Action
	Case "add","edit"
		Call MainList()
	Case "FastSave"
		Call FastSave()
	Case "FastSave_all"
		Call FastSave_all	  
	Case "del_mk"
		Call del_mk()
	Case "del_mkb"
		Call del_mkb()	  
	Case Else
		Call MainList()
End Select

Sub FastSave()
	Response.Write "<!DOCTYPE html>" & vbCrLf
	Response.Write "<head>" & vbCrLf
	Response.Write "<title>选择快捷</title>" & vbCrlf
	Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" & vbCrLf
	Response.Write "<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-status-bar-style' content='black'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-capable' content='yes'>" & vbCrLf
	Response.Write "<meta name='format-detection' content='telephone=no'>" & vbCrLf
	Response.Write "<link rel=""stylesheet"" type=""text/css"" href=""../fonts/font-awesome/css/font-awesome.min.css"" />" & vbCrLf
	Response.Write "<link href='../Plugins/layui/css/layui.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='../Style/global.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='../Style/font.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<script type='text/javascript'>" & vbCrLf
	Response.Write "var pc_file = '" & InstallDir & "';" & vbCrLf
	Response.Write "var admin_file = '" & AdminFolder & "/';" & vbCrLf
	Response.Write "</script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Js/Admin.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../../Dialog/main.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../../Dialog/lhgcore.min.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../../Dialog/lhgcalendar.min.js'></script>" & vbCrLf
	Response.Write "<script type=""text/javascript"" src=""../Plugins/layui/layui.js""></script>" & vbCrLf
	ItemID=Code_CLng(Request("id"))
	
	if Request("tya")="add" then
		Dim ItemID,mm
		mm=1
		'取得唯一任务ID号  
		For Each Node In FieldXMLb.DocumentElement.SelectNodes("item")
			if FieldXMLb.DocumentElement.SelectNodes("item").length=mm  then
				ItemID=Code_CLng(Node.SelectSingleNode("@id").text)+1
			end if 
			mm=mm+1
		Next
		
		if not FieldXML.DocumentElement.SelectSingleNode("/field/item[Fast='" & Request("Fast_name") &"']") is nothing then
			AlertHintScript "您输入的的快捷菜单名称存在，请输入其它的名称！"
		end if
		if not FieldXMLall.DocumentElement.SelectSingleNode("/field/item[Fast='" & Request("Fast_name") &"']") is nothing then
			AlertHintScript "您输入的的快捷菜单名称存在，请输入其它的名称！"
		end if
		
		if FieldXMLb.DocumentElement.SelectNodes("item").length=0 then ItemID=1
		XMLStr="<?xml version=""1.0"" encoding=""utf-8"" ?>" &vbcrlf
		XMLStr=XMLStr&"<item isenable="""& Request("order") &""" id="""& ItemID &""">" &vbcrlf
		XMLStr=XMLStr&" <Fast>" & Request("Fast_name") &"</Fast>" &vbcrlf
		XMLStr=XMLStr&" <Fasturl>" & Request("Fast_url") &"</Fasturl>" &vbcrlf
		XMLStr=XMLStr&" <Attribute>" & Request("Attribute") &"</Attribute>" &vbcrlf
		XMLStr=XMLStr&" <Fastico>" & Request("ico_url") &"</Fastico>" &vbcrlf
		XMLStr=XMLStr&" <order>" &Request("order") &"</order>" &vbcrlf
		XMLStr=XMLStr&"</item>" &vbcrlf
		XMLStr=Replace(XMLStr, "&", "|Fast|")
		set XML2 = Server.CreateObject("Microsoft.XMLDOM")
		XML2.LoadXml(XMLStr)
		set NewNode=XML2.documentElement
		Set TN=FieldXMLb.DocumentElement
		TN.appendChild(NewNode)
		FieldXMLb.Save(Server.MapPath("../Include/FilMk/"& Login_Username&"_Mk_b.xml"))
		Response.Write "<script type=""text/javascript"">location.href='Admin_Index_Mk.asp'</script>"
	end if
	
	if Request("tya")="addmka" then
		mm=1
		'取得唯一任务ID号
		
		For Each Node In FieldXML.DocumentElement.SelectNodes("item")
			if FieldXML.DocumentElement.SelectNodes("item").length=mm then
				ItemID=Code_CLng(Node.SelectSingleNode("@id").text)+1
			end if 
			mm=mm+1
		Next
		
		Set Node=FieldXMLb.DocumentElement.SelectSingleNode("item[@id=" & Code_CLng(Request("id")) & "]")
		If Not Node Is Nothing Then
			XMLStr="<?xml version=""1.0"" encoding=""utf-8"" ?>" &vbcrlf
			XMLStr=XMLStr&"<item isenable="""& Node.SelectSingleNode("order").text  &""" id="""& ItemID &""">" &vbcrlf
			XMLStr=XMLStr&" <Fast>" & Node.SelectSingleNode("Fast").text  &"</Fast>" &vbcrlf
			XMLStr=XMLStr&" <Fasturl>" & Replace(Node.SelectSingleNode("Fasturl").text,"|Fast|","&") &"</Fasturl>" &vbcrlf
			XMLStr=XMLStr&" <Attribute>" & Node.SelectSingleNode("Attribute").text &"</Attribute>" &vbcrlf
			XMLStr=XMLStr&" <Fastico>" & Node.SelectSingleNode("Fastico").text &"</Fastico>" &vbcrlf
			XMLStr=XMLStr&" <order>" &Node.SelectSingleNode("order").text &"</order>" &vbcrlf
			XMLStr=XMLStr&"</item>" &vbcrlf
			XMLStr=Replace(XMLStr, "&", "|Fast|")
			set XML2 = Server.CreateObject("Microsoft.XMLDOM")
			XML2.LoadXml(XMLStr)
			set NewNode=XML2.documentElement
			Set TN=FieldXML.DocumentElement
			TN.appendChild(NewNode)
			FieldXML.Save(Server.MapPath("../Include/FilMk/"&Login_Username&"_Mk_a.xml"))
		End If
		Response.Write "<script type=""text/javascript"">" & vbCrlf
		Response.Write "layui.use(['form','element'], function () {" & vbCrlf
		Response.Write "	var form = layui.form,element = layui.element;" & vbCrlf
		Response.Write "	$(document).ready(function(){" & vbCrlf
		Response.Write "		var str=""""" & vbCrlf
		Response.Write "		str=str+(""        <div id=\""cpbox_" & ItemID & "\"" class=\""panel layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg2\"">"");" & vbCrlf
		Response.Write "		str=str+(""            <a id=\""url_" & ItemID & "\"" href=\""javascript:;\"" data-url=\""" & Node.SelectSingleNode("Fasturl").text & "\"" onmouseover=\""layer.tips('" & Node.SelectSingleNode("Fast").text & "',this,{tips: [1, '#000']});\"" onmouseout=\""layer.closeAll();\"">"");" & vbCrlf
		Response.Write "		str=str+(""                <div class=\""panel_icon layui-bg-green\"">"");" & vbCrlf
		Response.Write "		str=str+(""                    <i id=\""img_" & ItemID & "\"" class=\""layui-anim icon " & Node.SelectSingleNode("Fastico").text  & "\""></i>"");" & vbCrlf
		Response.Write "		str=str+(""                </div>"");" & vbCrlf
		Response.Write "		str=str+(""                <div class=\""panel_word\"">"");" & vbCrlf
		Response.Write "		str=str+(""                    <span>" & Node.SelectSingleNode("Fast").text & "</span>"");" & vbCrlf
		Response.Write "		str=str+(""                    <cite>" & Node.SelectSingleNode("Fast").text & "</cite>"");" & vbCrlf
		Response.Write "		str=str+(""                </div>"");" & vbCrlf
		Response.Write "		str=str+(""            </a>"");" & vbCrlf
		Response.Write "		str=str+(""            <span class=\""delico\""><img title=\""删除快捷\"" src=\""Images/FilMk/mk_del.png\"" onClick=\""delbox(this,'" & ItemID & "')\""/></span>"");" & vbCrlf
		Response.Write "		str=str+(""        </div>"");" & vbCrlf
		Response.Write "		var newmk=$(parent.frames[""main""].document).find('#cpboxadd').before(str);	" & vbCrlf
		Response.Write "		layer.alert('添加成功！',function(){ownerDialog.close();});" & vbCrlf
		Response.Write "	});" & vbCrlf
		Response.Write "});" & vbCrlf
		Response.Write "</script>" & vbCrlf
		Response.Write "<body>" & vbCrlf
		Response.Write "</body>" & vbCrlf
		Response.Write "</html>"
	end if
	
	if Request("tya")="edit" then
		Set Node=FieldXML.DocumentElement.SelectSingleNode("item[@id=" & ItemID & "]")
		Node.Attributes.getNamedItem("isenable").text=Request("order")
		Node.childnodes(0).text=Request("Fast_name")
		Node.childNodes(1).text=Request("Fast_url")
		Node.childNodes(2).text=Request("Attribute")
		Node.childNodes(3).text=Request("ico_url") 
		Node.childNodes(4).text=Request("order")
		FieldXML.Save(Server.MapPath("../Include/FilMk/"&Login_Username&"_Mk_a.xml"))
		Response.Write "<script type=""text/javascript"">" & vbCrlf
		Response.Write "$(document).ready(function(){" & vbCrlf
		Response.Write "	//top.frames['main'].location.href='index.asp?action=Main'" & vbCrlf
		Response.Write "	//alert(""---------"")" & vbCrlf
		Response.Write "	//var str=""""" & vbCrlf
		Response.Write "	" & vbCrlf
		Response.Write "	//var mm=$(parent.frames[""main""].document).find(""#cpbox"").length" & vbCrlf
		Response.Write "	//alert(mm)" & vbCrlf
		Response.Write "	$("".hiddiv"").append(str);" & vbCrlf
		Response.Write "	//$(parent.frames[""main""].document).find(""#zzname"").val(mytext);" & vbCrlf
		Response.Write "	//$(parent.frames[""main""].document).find(""#zzid"").val(myid);" & vbCrlf
		Response.Write "	Dialog.alert('编辑成功！',function(){window.location = 'Admin/Admin_Index_Mk.asp';});" & vbCrlf
		Response.Write "});" & vbCrlf
		Response.Write "</script>" & vbCrlf
		Response.Write "<body>" & vbCrlf
		Response.Write "</body>" & vbCrlf
		Response.Write "</html>"
	end if
End Sub

Sub FastSave_all()
	dim mm
	Response.Write "<!DOCTYPE html>" & vbCrLf
	Response.Write "<head>" & vbCrLf
	Response.Write "<title>选择快捷</title>" & vbCrlf
	Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" & vbCrLf
	Response.Write "<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-status-bar-style' content='black'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-capable' content='yes'>" & vbCrLf
	Response.Write "<meta name='format-detection' content='telephone=no'>" & vbCrLf
	Response.Write "<link rel=""stylesheet"" type=""text/css"" href=""../fonts/font-awesome/css/font-awesome.min.css"" />" & vbCrLf
	Response.Write "<link href='../Plugins/layui/css/layui.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='../Style/global.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='../Style/font.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<script type='text/javascript'>" & vbCrLf
	Response.Write "var pc_file = '" & InstallDir & "';" & vbCrLf
	Response.Write "var admin_file = '" & AdminFolder & "/';" & vbCrLf
	Response.Write "</script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Js/Admin.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../../Dialog/main.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../../Dialog/lhgcore.min.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../../Dialog/lhgcalendar.min.js'></script>" & vbCrLf
	Response.Write "<script type=""text/javascript"" src=""../Plugins/layui/layui.js""></script>" & vbCrLf
	ItemID=Code_CLng(Request("id"))
	if Request("tya")="addmka" then
		mm=1
		
		'取得唯一任务ID号
		For Each Node In FieldXML.DocumentElement.SelectNodes("item")
			if FieldXML.DocumentElement.SelectNodes("item").length=mm then
				ItemID=Code_CLng(Node.SelectSingleNode("@id").text)+1
			end if 
			mm=mm+1
		Next
		
		Set Node=FieldXMLall.DocumentElement.SelectSingleNode("item[@id=" & Code_CLng(Request("id")) & "]")
		If Not Node Is Nothing Then
			if not FieldXML.DocumentElement.SelectSingleNode("/field/item[Fast='" & Node.SelectSingleNode("Fast").text &"']") is nothing then
				AlertHintScript "您选择的项目已添加过了！"
			end if
			
			XMLStr="<?xml version=""1.0"" encoding=""utf-8"" ?>" &vbcrlf
			XMLStr=XMLStr&"<item isenable="""& Node.SelectSingleNode("order").text  &""" id="""& ItemID &""">" &vbcrlf
			XMLStr=XMLStr&" <Fast>" & Node.SelectSingleNode("Fast").text  &"</Fast>" &vbcrlf
			XMLStr=XMLStr&" <Fasturl>" & Replace(Node.SelectSingleNode("Fasturl").text,"|Fast|","&") &"</Fasturl>" &vbcrlf
			XMLStr=XMLStr&" <Attribute>" & Node.SelectSingleNode("Attribute").text &"</Attribute>" &vbcrlf
			XMLStr=XMLStr&" <Fastico>" & Node.SelectSingleNode("Fastico").text &"</Fastico>" &vbcrlf
			XMLStr=XMLStr&" <order>" &Node.SelectSingleNode("order").text &"</order>" &vbcrlf
			XMLStr=XMLStr&"</item>" &vbcrlf
			XMLStr=Replace(XMLStr, "&", "|Fast|")
			set XML2 = Server.CreateObject("Microsoft.XMLDOM")
			XML2.LoadXml(XMLStr)
			set NewNode=XML2.documentElement
			Set TN=FieldXML.DocumentElement
			TN.appendChild(NewNode)
			FieldXML.Save(Server.MapPath("../Include/FilMk/"&Login_Username&"_Mk_a.xml"))
		End If	
		Response.Write "<script type=""text/javascript"">" & vbCrlf
		Response.Write "layui.use(['form','element'], function () {" & vbCrlf
		Response.Write "	var form = layui.form,element = layui.element;" & vbCrlf
		Response.Write "	$(document).ready(function(){" & vbCrlf
		Response.Write "		var str=""""" & vbCrlf
		Response.Write "		str=str+(""        <div id=\""cpbox_" & ItemID & "\"" class=\""panel layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg2\"">"");" & vbCrlf
		Response.Write "		str=str+(""            <a id=\""url_" & ItemID & "\"" href=\""javascript:;\"" data-url=\""" & Node.SelectSingleNode("Fasturl").text & "\"" onmouseover=\""layer.tips('" & Node.SelectSingleNode("Fast").text & "',this,{tips: [1, '#000']});\"" onmouseout=\""layer.closeAll();\"">"");" & vbCrlf
		Response.Write "		str=str+(""                <div class=\""panel_icon layui-bg-green\"">"");" & vbCrlf
		Response.Write "		str=str+(""                    <i id=\""img_" & ItemID & "\"" class=\""layui-anim icon " & Node.SelectSingleNode("Fastico").text  & "\""></i>"");" & vbCrlf
		Response.Write "		str=str+(""                </div>"");" & vbCrlf
		Response.Write "		str=str+(""                <div class=\""panel_word\"">"");" & vbCrlf
		Response.Write "		str=str+(""                    <span>" & Node.SelectSingleNode("Fast").text & "</span>"");" & vbCrlf
		Response.Write "		str=str+(""                    <cite>" & Node.SelectSingleNode("Fast").text & "</cite>"");" & vbCrlf
		Response.Write "		str=str+(""                </div>"");" & vbCrlf
		Response.Write "		str=str+(""            </a>"");" & vbCrlf
		Response.Write "		str=str+(""            <span class=\""delico\""><img title=\""删除快捷\"" src=\""Images/FilMk/mk_del.png\"" onClick=\""delbox(this,'" & ItemID & "')\""/></span>"");" & vbCrlf
		Response.Write "		str=str+(""        </div>"");" & vbCrlf
		Response.Write "		$(parent.frames[""main""].document).find('#cpboxadd').before(str);" & vbCrlf
		Response.Write "		layer.alert('添加成功！',function(){ownerDialog.close();});" & vbCrlf
		Response.Write "	});" & vbCrlf
		Response.Write "});" & vbCrlf
		Response.Write "</script>" & vbCrlf
		Response.Write "<body>" & vbCrlf
		Response.Write "</body>" & vbCrlf
		Response.Write "</html>"
	end if
End Sub

Sub del_mk()
	ItemID=Code_CLng(Request("id"))
	' If ItemID=0 Then AlertHintScript "对不起,参数出错!"
	Dim DelNode,ID
	Set DelNode=FieldXML.DocumentElement.SelectSingleNode("item[@id=" & ItemID & "]")
	If DelNode Is Nothing  Then
		AlertHintScript "对不起,参数出错!"
	End If
	FieldXML.DocumentElement.RemoveChild(DelNode)
	
	'更新比当前任务ID大的ID号,依次减一
	'For Each Node In FieldXML.DocumentElement.SelectNodes("item")
		'ID=Code_CLng(Node.SelectSingleNode("@id").text)
		'If ID>ItemID Then
			'Node.SelectSingleNode("@id").text=ID-1
		'End If
	'Next
	'保存
	FieldXML.Save(Server.MapPath("../Include/FilMk/"&Login_Username&"_Mk_a.xml"))
	'AlertHintScript "恭喜删除!"
End Sub 

Sub del_mkb()
	ItemID=Code_CLng(Request("id"))
	If ItemID=0 Then AlertHintScript "对不起,参数出错!"
	Dim DelNode,ID
	Set DelNode=FieldXMLb.DocumentElement.SelectSingleNode("item[@id=" & ItemID & "]")
	If DelNode Is Nothing  Then
		AlertHintScript "对不起,参数出错!"
	End If
	FieldXMLb.DocumentElement.RemoveChild(DelNode)
	FieldXMLb.Save(Server.MapPath("../Include/FilMk/"&Login_Username&"_Mk_b.xml"))
	Response.Write "<script type=""text/javascript"">location.href='Admin_Index_Mk.asp'</script>" & vbCrlf
End Sub

Sub MainList()
	tya="add"
	dim Fast,Fasturl,Attribute,Fastico,Nodek
	if Request("Action")="edit" then
		ItemID=Code_CLng(Request("id"))
		If ItemID=0 Then AlertHintScript "对不起,参数出错!"
		Set Node=FieldXML.DocumentElement.SelectSingleNode("item[@id=" & ItemID & "]")
		If Not Node Is Nothing Then
			Fast=Node.SelectSingleNode("Fast").text 
			Fasturl=Replace(Node.SelectSingleNode("Fasturl").text,"|Fast|","&")
			Attribute=Node.SelectSingleNode("Attribute").text
			Fastico=Node.SelectSingleNode("Fastico").text
			tya="edit"
		End If	
	end if
	if Fastico="" then Fastico="icon-home"
	With Response
		.Write "<!DOCTYPE html>" & vbCrLf
		.Write "<head>" & vbCrLf
		.Write "<title>选择快捷</title>" & vbCrLf
		.Write "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" & vbCrLf
		.Write "<link rel=""stylesheet"" type=""text/css"" href=""../fonts/font-awesome/css/font-awesome.min.css"" />" & vbCrLf
		.Write "<link href=""../Plugins/layui/css/layui.css"" rel=""stylesheet"" type=""text/css"" />" & vbCrLf
		.Write "<link href='../Style/global.css' rel='stylesheet' type='text/css' />" & vbCrLf
		.Write "<link href=""../Style/font.css"" rel=""stylesheet"" type=""text/css"" />" & vbCrLf
		.Write "<script type='text/javascript'>" & vbCrLf
		.Write "var pc_file = '" & InstallDir & "';" & vbCrLf
		.Write "var admin_file = '" & AdminFolder & "/';" & vbCrLf
		.Write "</script>" & vbCrLf
		.Write "<script type='text/javascript' src='../Js/Admin.js'></script>" & vbCrLf
		.Write "<script type='text/javascript' src='../../Dialog/main.js'></script>" & vbCrLf
		.Write "<script type='text/javascript' src='../../Dialog/lhgcore.min.js'></script>" & vbCrLf
		.Write "<script type='text/javascript' src='../../Dialog/lhgcalendar.min.js'></script>" & vbCrLf
		.Write "<script type=""text/javascript"" src=""../Plugins/layui/layui.js""></script>" & vbCrLf
		.Write "</head>"
		.Write "<body topmargin=""0"" leftmargin=""0"" style=""background:#F2F2F2"">"
		.Write "<ul id='menu_top'>" & vbCrlf
		.Write "<span class=""addstyle""><img src=""../Images/FilMk/titleka.png"" onMouseOver=""addbut(this,'ok');"" onmouseout=""addbut(this,'no')"" onClick=""$('#mkselsec').toggle(200);"" style=""border:none;cursor:pointer;""/></span></ul>" & vbCrlf
		.Write "<script type=""text/javascript"">" & vbCrlf
		.Write "function addbut(obj,csk){" & vbCrlf
		.Write "if (csk==""ok"")" & vbCrlf
		.Write "{" & vbCrlf
		.Write "$(obj).attr(""src"",""../Images/FilMk/titlekb.png"")" & vbCrlf
		.Write "}" & vbCrlf
		.Write "else" & vbCrlf
		.Write "{" & vbCrlf
		.Write "$(obj).attr(""src"",""../Images/FilMk/titleka.png"")" & vbCrlf
		.Write "}" & vbCrlf
		.Write "}" & vbCrlf
		.Write "function add_mk(f_id){" & vbCrlf
		.Write "location.href='Admin_Index_Mk.asp?Action=FastSave&tya=addmka&id='+f_id" & vbCrlf
		.Write "}" & vbCrlf
		.Write "function add_mk_all(f_id){" & vbCrlf
		.Write "location.href='Admin_Index_Mk.asp?Action=FastSave_all&tya=addmka&id='+f_id" & vbCrlf
		.Write "}" & vbCrlf
		.Write "function CheckForm()" & vbCrlf
		.Write "{" & vbCrlf
		.Write "if ($(""input[name=Fast_name]"").val()=='')" & vbCrlf
		.Write "{" & vbCrlf
		.Write "IsAlertFocus('请输入--快捷名称!','Fast_name');" & vbCrlf
		.Write "return false" & vbCrlf
		.Write "}" & vbCrlf
		.Write "if ($(""input[name=Fast_url]"").val()=='')" & vbCrlf
		.Write "{" & vbCrlf
		.Write "IsAlertFocus('请输入--快捷功能地址!','Fast_url');" & vbCrlf
		.Write "return false;" & vbCrlf
		.Write "}" & vbCrlf
		.Write "if ($(""input[name=ico_url]"").val()=='')" & vbCrlf
		.Write "{" & vbCrlf
		.Write "IsAlertFocus('请输入--图标地址!','ico_url');" & vbCrlf
		.Write "$(""input[name=ico_url]"").focus();" & vbCrlf
		.Write "return false;" & vbCrlf
		.Write "}" & vbCrlf
		.Write "if ($(""input[name=order]"").val()=='')$(""input[name=order]"").val(""0"");" & vbCrlf
		.Write "return true;" & vbCrlf
		.Write "}" & vbCrlf
		.Write "function del_mkb(id){ " & vbCrlf
		.Write "IsConfirm('是否删除!','Admin/Admin_Index_Mk.asp?Action=del_mkb&id='+id)" & vbCrlf
		.Write "}" & vbCrlf
		.Write "function boxclose(){" & vbCrlf
		.Write "ownerDialog.close();" & vbCrlf
		.Write "}" & vbCrlf
		.Write "function delbox(id){" & vbCrlf
		.Write "Dialog.alert('确定要删除快捷？',function(){del_mkb(id);});" & vbCrlf
		.Write "}" & vbCrlf
		.Write "</script>" & vbCrlf
		.Write "<div id=""mkselsec"" style=""display:none"">" & vbCrlf
		.Write "<form name='myform' method='Post' action='Admin_Index_Mk.asp'>" & vbCrlf
		.Write "<table class=""layui-table magt0"">" & vbCrlf
		.Write "<input type=""hidden"" value=""" & ItemID & """ name=""id"" id=""id"">" & vbCrlf
		.Write "<input type=""hidden"" value=""FastSave"" name=""action"" id=""action"">" & vbCrlf
		.Write "<input type=""hidden"" value=""" & tya & """  name=""tya"" id=""tya"">" & vbCrlf
		.Write "<input type=""hidden"" value=""1"" name=""v"">" & vbCrlf
		.Write "<tr>" & vbCrlf
		.Write "<td width=""30%"" align=""center"" style=""border-bottom:1px solid #CCCCCC"" > 快捷名称:</td>" & vbCrlf
		.Write "<td width=""70%"" bgcolor=""#FFFFFF"" style=""border-bottom:1px solid #CCCCCC; padding-left:5px""><input class=""textbox"" id=""Fast_name"" name=""Fast_name"" type=""text"" value=""" & Fast & """ size=""10""  /> </td>" & vbCrlf
		.Write "</tr>" & vbCrlf
		.Write "<tr>" & vbCrlf
		.Write "<td width=""30%"" align=""center"" style=""border-bottom:1px solid #CCCCCC"" > 快捷功能地址:</td>" & vbCrlf
		.Write "<td width=""70%"" bgcolor=""#FFFFFF"" style=""border-bottom:1px solid #CCCCCC; padding-left:5px"">" & vbCrlf
		.Write "<input id=""Fast_url"" name=""Fast_url"" class=""textbox"" type=""text"" value=""" & Fasturl & """  size=""30""/>" & vbCrlf
		.Write "属性:" & vbCrlf
		.Write "<div id=""Attribute_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:80px;""><input type=""text"" ztype=""select"" id=""Attribute"" name=""Attribute"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:80px;position:absolute;z-index:-1;"" value=""" & Attribute & """ startvalue=""" & Attribute & """/><input type=""text"" id=""Attribute_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:80px;"" /><a id=""Attribute_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""Attribute_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""Attribute_ul"" style=""left:-1px; width:-1px;""><script>Combox_Attribute_Init=function(){var _el=Zving.getDom('Attribute');if(_el._components){return true;}var  _data=[];var  _DataSource;_data.push(['disabled','管理查看']);_data.push(['GO','新建增加']);_data.push(['SetParam','修改保存']);var combox_Attribute = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_Attribute_Init();}else{Zving.Page.onReady(Combox_Attribute_Init);}</script></div></div></div>" & vbCrlf
		.Write "</td>" & vbCrlf
		.Write "</tr>" & vbCrlf
		.Write "<tr valign=""top"">" & vbCrlf
		.Write "<td width=""30%"" align=""center""  style=""border-bottom:1px solid #CCCCCC""> 图标选择:<br/><font color=""#FF0000"">图标40X40</font></td>" & vbCrlf
		.Write "<td width=""70%"" bgcolor=""#FFFFFF"" style=""border-bottom:1px solid #CCCCCC; padding-left:5px"">" & vbCrlf
		.Write "<input id=""ico_url"" name=""ico_url"" type=""text"" class=""textbox"" value=""" & Fastico & """ size=""30"" />" & vbCrlf
		.Write "<i id=""img_ico"" class=""iconbox icon " & Fastico & """></i>" & vbCrlf
		.Write "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""$('#Fastico').toggle(200);"">选择图标..</button>" & vbCrlf
		.Write "<div id=""Fastico"" style=""display:none; padding:5px; overflow:hidden;"" >" & vbCrlf
		.Write "<ul class=""icons layui-row""></ul>" & vbCrlf
		.Write "</div>" & vbCrlf
		.Write "</td>" & vbCrlf
		.Write "</tr>" & vbCrlf
		.Write "<tr style=""display:none"">" & vbCrlf
		.Write "<td width=""30%"" align=""center"" style=""border-bottom:1px solid #CCCCCC; display:none""> 序号排列:</td>" & vbCrlf
		.Write "<td width=""70%"" bgcolor=""#FFFFFF"" style=""border-bottom:1px solid #CCCCCC;padding-left:5px;display:none"">" & vbCrlf
		.Write "<input name=""order"" size=""5"" class=""textbox"" type=""text"" value=""1"" onkeyup=""this.value=this.value.replace(/\D/g,'')"" onafterpaste=""this.value=this.value.replace(/\D/g,'')"" /> " & vbCrlf
		.Write "</td>" & vbCrlf
		.Write "</tr>" & vbCrlf
		.Write "</table>" & vbCrlf
		.Write "<div  align=""center"" style=""margin-top:5px;"">" & vbCrlf
		if Request("Action")="add" then
			.Write "<button type=""submit"" class=""layui-btn"" hidefocus=""true"" onClick=""return(CheckForm())"">添加</button>" & vbCrlf
		else
			.Write "<button type=""submit"" class=""layui-btn"" hidefocus=""true"" onClick=""return(CheckForm())"">保存</button>" & vbCrlf
		end if
		if Request("Action")="add" then
			.Write "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""$('#mkselsec').toggle(200);"">返回</button>" & vbCrlf
		else
			.Write "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""$('#mkselsec').toggle(200);"">返回</button>" & vbCrlf
		end if
			.Write "</div>" & vbCrlf
		.Write "</form>" & vbCrlf
		.Write "</div>" & vbCrlf
		.Write "<div id=""cpbox"" class=""mk_list"">"
		dim Nodekall
		For Each Nodekall In NodeXMLall
			.Write "<div id=""cpbox"" class=""cp_box"">"
			.Write "<i class=""layui-anim icon " & Nodekall.SelectSingleNode("Fastico").text  & """></i><br/>" & vbCrlf
			.Write "<span>" & Nodekall.SelectSingleNode("Fast").text & "</span><br />" & vbCrlf
			.Write "<input name="""" class=""but1""  value="""" type=""button"" onclick=""add_mk_all('" & Nodekall.SelectSingleNode("@id").text & "');"" /> " & vbCrlf
			.Write "</div>"
		Next
		For Each Nodek In NodeXMLb
			.Write "<div id=""cpbox"" class=""cp_box"">"
			.Write "<i id=""img_" & Nodek.SelectSingleNode("@id").text & """ class=""layui-anim icon " & Nodek.SelectSingleNode("Fastico").text  & """></i><br/>" & vbCrlf
			.Write "<span>" & Nodek.SelectSingleNode("Fast").text & "</span><br />" & vbCrlf
			.Write "<input name="""" class=""but1"" value="""" type=""button"" onclick=""add_mk('" & Nodek.SelectSingleNode("@id").text & "');"" /> " & vbCrlf
			.Write "<span style=""position:absolute; top:-6px; right:-6px;"" >" & vbCrlf
			.Write "<input name=""dfgdfg"" class=""but"" type=""button"" onClick=""{del_mkb('" & Nodek.SelectSingleNode("@id").text & "')}""/>" & vbCrlf
			.Write "</span>" & vbCrlf
			.Write "</div>"
		Next
		.Write "</div>"
		.Write "<div style=""height:20px;clear:both; overflow:hidden;clear:both;""></div>" & vbCrlf
		.Write "<script type=""text/javascript"" src=""../Js/mk-icons.js""></script>" & vbCrLf
		.Write "</body>" & vbCrlf
		.Write "</html>" & vbCrlf
	End With
End Sub

'提示成功。并返回
Sub AlertHintScript(SuccessStr)
	Response.Write "<script language=JavaScript>" & vbCrLf
	Response.Write "Dialog.alert('" & SuccessStr & "',function(){location.replace('" & Request.ServerVariables("HTTP_REFERER") & "');});" & vbCrLf
	Response.Write "</script>" & vbCrLf
	Response.End()
End Sub
%>